from construct3 import *



s = Struct(
    ("foo", UBInt8),
    ("bar", Struct(
        ("spam", Field(this._.foo + 1)),
        ("eggs", Field(2)),
    )),
)

x = s.parse("\x05hello\x00xxy")
print x
#print repr(s.build(x))







